import React from 'react';
import 'css/default.css';
import 'css/App.css';
import 'css/index.css';
import 'css/Head.css';
import Head from "./component/index/Head";
import FillQust from "./component/index/FillQust";
import HistorySearch from "page/index/HistorySearch";
import CreateQust from "./component/index/CreateQust";
import LoginOrRegister from "page/index/LoginOrRegister";
import {BrowserRouter as Router, Route, Link} from 'react-router-dom';
import icon from '../assets/images/aaa.png'

export default class App extends React.Component {


  componentDidMount() {
    // var myIcon = new Image(); //这里新建一个Img标签
    // myIcon.src = icon;
    // document.getElementById('newest_code').appendChild(myIcon);
  }

  render() {


    return <div className='index'>

      <Router>
        <Route path="/"/>
        <Head/>
        <Route path="/login" exact component={LoginOrRegister}/>
          <Route path="/FillQust" exact component={FillQust}/>
          <Route path='/History'exact component={HistorySearch}/>
          <Route path="/CreateQust" exact component={CreateQust}/>
          <div id='newest_code' className='newest_code'>
          </div>
      </Router>

    </div>
  }

}

